<template>
  <div>
    <van-nav-bar
        title="管理中心"
    />
    <div class="imgDiv">
      <van-card
          :title="user.nickname"
          :thumb="user.headImageUrl"
      />
    </div>
    <div class="cellDiv">
      <van-cell title="资质管理" is-link to="/operator/uploader" class="vanCell"/>
    </div>

<!--    <div class="cellDiv">-->
<!--      <van-cell title="资质列表" is-link to="index" class="vanCell"/>-->
<!--    </div>-->
    <div class="cellDiv">
      <van-cell title="运营商信息" is-link to="/operator/info" class="vanCell"/>
    </div>
    <div class="cellDiv">
      <van-cell title="设备管理" is-link to="/operator/machine/list" class="vanCell"/>
    </div>
    <div class="cellDiv">
      <van-cell title="信息提示" is-link to="index" class="vanCell"/>
    </div>

  </div>
</template>

<script>
import {getInfo} from "@/api/operator";
import {setLocalOpenId,getLocalOpenId} from "@/utils/wxUtil";

export default {
  data() {
    return {
      getInfoReq: {
        openId: getLocalOpenId()
      },
      user: {
        nickname: '',
        headImageUrl: ''
      }

    };
  },
  methods: {},
  mounted() {
    getInfo(this.getInfoReq).then(res => {
      this.user.nickname = res.data.nickname
      this.user.headImageUrl = res.data.headImageUrl
    })
  }
}
</script>

<style lang="scss" scoped>
.imgDiv {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vanCell {
  background-color: #F7F8FA;
  font-weight: bold;
  margin-top: 20px;
  margin-left: 5%;
  border-radius: 20px;
  width: 90%;
}
</style>
